/* ChatToolbar 样式文件 */
.footer-tools {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  gap: 8px;
}

.tools-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.tools-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-tool-icon {
  cursor: pointer;
  font-size: 20px;
  color: #666;
  transition: color 0.2s;
  padding: 4px;
}

.footer-tool-icon:hover {
  color: #16baaa;
}

.memory-enabled {
  color: #16baaa !important;
}

.prompt-enabled {
  color: #16baaa !important;
}

.prompt-active {
  color: #16baaa !important;
}

.knowledge-enabled {
  color: #16baaa !important;
}

.knowledge-active {
  color: #16baaa !important;
}

.mcp-enabled {
  color: #16baaa !important;
}

.image-enabled {
  color: #16baaa !important;
}

.footer-model-selector {
  position: relative;
  display: flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  background: white;
  font-size: 14px;
  white-space: nowrap;
}

.footer-model {
  margin-right: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer-model-arrow {
  margin-left: 4px;
}

.model-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  min-width: 320px;
  max-width: 450px;
  width: max-content;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-height: 200px;
  overflow-y: auto;
  /* 移除 z-index: 1000; */
  margin-bottom: 4px;
}

.model-dropdown-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.model-dropdown-item:hover {
  background: #f5f5f5;
}

.model-dropdown-item.active {
  background: #e6f7f5;
  color: #16baaa;
}

.prompt-template-selector,
.knowledge-base-selector {
  min-width: 200px;
  max-width: 300px;
}

.prompt-header,
.knowledge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
  font-weight: bold;
}

.prompt-title,
.knowledge-title {
  font-size: 14px;
}

.template-list,
.knowledge-list {
  max-height: 300px;
  overflow-y: auto;
}

.template-item,
.knowledge-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}

.template-item:hover,
.knowledge-item:hover {
  background: #f5f5f5;
}

.template-item.selected,
.knowledge-item.selected {
  background: #e6f7f5;
  color: #16baaa;
}

.template-item-name,
.knowledge-item-name {
  flex: 1;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.knowledge-item-check,
.template-item-check {
  margin-left: 8px;
}

.custom-popover,
.prompt-popover,
.knowledge-popover {
  --n-color: white;
  --n-text-color: #333;
  --n-border-radius: 8px;
  --n-box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.popover-text {
  font-size: 12px;
  padding: 4px 8px;
}

/* 历史会话抽屉样式 */
.drawer-history-list {
  padding: 0;
}

.drawer-history-date {
  font-weight: bold;
  color: #666;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 4px;
}

.drawer-history-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.drawer-history-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
}

.drawer-history-list li:hover {
  background-color: #f8f9fa;
}

.drawer-history-list li.active {
  background-color: #e6f7f5;
  color: #16baaa;
}

.drawer-history-title {
  flex: 1;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-history-time {
  font-size: 11px;
  color: #999;
  margin-left: 8px;
}

.drawer-history-delete {
  color: #ff4d4f;
  cursor: pointer;
  margin-left: 8px;
}

.drawer-history-delete:hover {
  color: #ff7875;
}

.session-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
}

.session-item:hover {
  background-color: #f8f9fa;
}

.session-item.active {
  background-color: #e6f7f5;
  color: #16baaa;
}

.session-title {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #666;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #eee;
  font-size: 16px;
  font-weight: bold;
}